package com.canic.dkd.authorization.staff.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.canic.dkd.authorization.staff.entity.SysPermission;
import com.canic.dkd.authorization.staff.entity.SysRole;
import com.canic.dkd.authorization.staff.entity.SysUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 用户
 * @author ZC
 * @since 2019-05-02
 */
@Repository
public interface SysUserMapper extends BaseMapper<SysUser> {

    /**
     * 根据用户ID获取该用户所有权限
     */
    List<SysPermission> getPermissionListByUserId(@Param("userId") String userId);

    /**
     * 根据用户ID获取该用户所有角色
     */
    List<SysRole> getRoleListByUserId(@Param("userId") String userId);

}
